<!DOCTYPE html>
<html>
  
<head>
    <title>
      Shinveam的主页
    </title>

    <link href="http://fonts.googleapis.com/css?family=Lato:100,300,400,700" media="all" rel="stylesheet" type="text/css" />
    <link href="/static/stylesheets/bootstrap.min.css" media="all" rel="stylesheet" type="text/css" />
    <link href="/static/stylesheets/font-awesome.css" media="all" rel="stylesheet" type="text/css" />
    <link href="/static/stylesheets/se7en-font.css" media="all" rel="stylesheet" type="text/css" />
    <link href="/static/stylesheets/isotope.css" media="all" rel="stylesheet" type="text/css" />
    <link href="/static/stylesheets/jquery.fancybox.css" media="all" rel="stylesheet" type="text/css" />
    <link href="/static/stylesheets/fullcalendar.css" media="all" rel="stylesheet" type="text/css" />
    <link href="/static/stylesheets/wizard.css" media="all" rel="stylesheet" type="text/css" />
    <link href="/static/stylesheets/select2.css" media="all" rel="stylesheet" type="text/css" />
    <link href="/static/stylesheets/morris.css" media="all" rel="stylesheet" type="text/css" />
    <link href="/static/stylesheets/datatables.css" media="all" rel="stylesheet" type="text/css" />
    <link href="/static/stylesheets/datepicker.css" media="all" rel="stylesheet" type="text/css" />
    <link href="/static/stylesheets/timepicker.css" media="all" rel="stylesheet" type="text/css" />
    <link href="/static/stylesheets/colorpicker.css" media="all" rel="stylesheet" type="text/css" />
    <link href="/static/stylesheets/bootstrap-switch.css" media="all" rel="stylesheet" type="text/css" />
    <link href="/static/stylesheets/daterange-picker.css" media="all" rel="stylesheet" type="text/css" />
    <link href="/static/stylesheets/typeahead.css" media="all" rel="stylesheet" type="text/css" />
    <link href="/static/stylesheets/summernote.css" media="all" rel="stylesheet" type="text/css" />
    <link href="/static/stylesheets/pygments.css" media="all" rel="stylesheet" type="text/css" />
    <link href="/static/stylesheets/style.css" media="all" rel="stylesheet" type="text/css" />
    <link href="/static/stylesheets/color/green.css" media="all" rel="alternate stylesheet" title="green-theme" type="text/css" />
    <link href="/static/stylesheets/color/orange.css" media="all" rel="alternate stylesheet" title="orange-theme" type="text/css" />
    <link href="/static/stylesheets/color/magenta.css" media="all" rel="alternate stylesheet" title="magenta-theme" type="text/css" />
    <link href="/static/stylesheets/color/gray.css" media="all" rel="alternate stylesheet" title="gray-theme" type="text/css" />

    <script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js" type="text/javascript"></script>
    <script src="/static/javascripts/bootstrap.min.js" type="text/javascript"></script>
    <script src="/static/javascripts/raphael.min.js" type="text/javascript"></script>
    <script src="/static/javascripts/selectivizr-min.js" type="text/javascript"></script>
    <script src="/static/javascripts/jquery.mousewheel.js" type="text/javascript"></script>
    <script src="/static/javascripts/jquery.vmap.min.js" type="text/javascript"></script>
    <script src="/static/javascripts/jquery.vmap.sampledata.js" type="text/javascript"></script>
    <script src="/static/javascripts/jquery.vmap.world.js" type="text/javascript"></script>
    <script src="/static/javascripts/jquery.bootstrap.wizard.js" type="text/javascript"></script>
    <script src="/static/javascripts/fullcalendar.min.js" type="text/javascript"></script>
    <script src="/static/javascripts/gcal.js" type="text/javascript"></script>
    {{/*<script src="/static/javascripts/jquery.dataTables.min.js" type="text/javascript"></script>*/}}
    {{/*<script src="/static/javascripts/datatable-editable.js" type="text/javascript"></script>*/}}
    <script src="/static/javascripts/jquery.easy-pie-chart.js" type="text/javascript"></script>
    <script src="/static/javascripts/excanvas.min.js" type="text/javascript"></script>
    <script src="/static/javascripts/jquery.isotope.min.js" type="text/javascript"></script>
    <script src="/static/javascripts/isotope_extras.js" type="text/javascript"></script>
    <script src="/static/javascripts/modernizr.custom.js" type="text/javascript"></script>
    <script src="/static/javascripts/jquery.fancybox.pack.js" type="text/javascript"></script>
    <script src="/static/javascripts/select2.js" type="text/javascript"></script>
    <script src="/static/javascripts/styleswitcher.js" type="text/javascript"></script>
    <script src="/static/javascripts/wysiwyg.js" type="text/javascript"></script>
    <script src="/static/javascripts/summernote.min.js" type="text/javascript"></script>
    <script src="/static/javascripts/jquery.inputmask.min.js" type="text/javascript"></script>
    <script src="/static/javascripts/jquery.validate.js" type="text/javascript"></script>
    <script src="/static/javascripts/bootstrap-fileupload.js" type="text/javascript"></script>
    <script src="/static/javascripts/bootstrap-datepicker.js" type="text/javascript"></script>
    <script src="/static/javascripts/bootstrap-timepicker.js" type="text/javascript"></script>
    <script src="/static/javascripts/bootstrap-colorpicker.js" type="text/javascript"></script>
    <script src="/static/javascripts/bootstrap-switch.min.js" type="text/javascript"></script>
    <script src="/static/javascripts/typeahead.js" type="text/javascript"></script>
    <script src="/static/javascripts/daterange-picker.js" type="text/javascript"></script>
    <script src="/static/javascripts/date.js" type="text/javascript"></script>
    <script src="/static/javascripts/morris.min.js" type="text/javascript"></script>
    <script src="/static/javascripts/skycons.js" type="text/javascript"></script>
    <script src="/static/javascripts/fitvids.js" type="text/javascript"></script>
    <script src="/static/javascripts/jquery.sparkline.min.js" type="text/javascript"></script>
    <script src="/static/javascripts/main.js" type="text/javascript"></script>
    <script src="/static/javascripts/respond.js" type="text/javascript"></script>

    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">

  </head>
  <body style="padding-top: 68px;">
    <div class="modal-shiftfix">
      <!-- Navigation -->
      <div class="navbar navbar-fixed-top scroll-hide" style="height: auto;">
        <div class="container-fluid top-bar">
          <div class="pull-right">
            <ul class="nav navbar-nav pull-right">
              <li class="dropdown notifications hidden-xs">
                <a class="dropdown-toggle" data-toggle="dropdown" href="#"><span aria-hidden="true" class="se7en-flag"></span>
                  <div class="sr-only">
                    Notifications
                  </div>
                </a>
                <ul class="dropdown-menu">
                  <li><a href="#">
                    <div class="notifications label label-info">
                      New
                    </div>
                    <p>
                      New user added: Jane Smith
                    </p></a>
                    
                  </li>
                  <li><a href="#">
                    <div class="notifications label label-info">
                      New
                    </div>
                    <p>
                      Sales targets available
                    </p></a>
                    
                  </li>
                  <li><a href="#">
                    <div class="notifications label label-info">
                      New
                    </div>
                    <p>
                      New performance metric added
                    </p></a>
                    
                  </li>
                  <li><a href="#">
                    <div class="notifications label label-info">
                      New
                    </div>
                    <p>
                      New growth data available
                    </p></a>
                    
                  </li>
                </ul>
              </li>
              <li class="dropdown messages hidden-xs">
                <a class="dropdown-toggle" data-toggle="dropdown" href="#"><span aria-hidden="true" class="se7en-envelope"></span>
                  <div class="sr-only">
                    Messages
                  </div>
                </a>
                <ul class="dropdown-menu messages">
                  <li><a href="#">
                    <img width="34" height="34" src="/static/images/avatar-male2.png" />Could we meet today? I wanted...</a>
                  </li>
                  <li><a href="#">
                    <img width="34" height="34" src="/static/images/avatar-female.png" />Important data needs your analysis...</a>
                  </li>
                  <li><a href="#">
                    <img width="34" height="34" src="/static/images/avatar-male2.png" />Buy Se7en today, it's a great theme...</a>
                  </li>
                </ul>
              </li>
              <li class="dropdown settings hidden-xs">
                <a class="dropdown-toggle" data-toggle="dropdown" href="#"><span aria-hidden="true" class="se7en-gear"></span>
                  <div class="sr-only">
                    Settings
                  </div>
                </a>
                <ul class="dropdown-menu">
                  <li>
                    <a class="settings-link blue" href="javascript:chooseStyle('none', 30)"><span></span>蓝</a>
                  </li>
                  <li>
                    <a class="settings-link green" href="javascript:chooseStyle('green-theme', 30)"><span></span>绿</a>
                  </li>
                  <li>
                    <a class="settings-link orange" href="javascript:chooseStyle('orange-theme', 30)"><span></span>橙</a>
                  </li>
                  <li>
                    <a class="settings-link magenta" href="javascript:chooseStyle('magenta-theme', 30)"><span></span>品红</a>
                  </li>
                  <li>
                    <a class="settings-link gray" href="javascript:chooseStyle('gray-theme', 30)"><span></span>灰</a>
                  </li>
                </ul>
              </li>
              <li class="dropdown user hidden-xs"><a data-toggle="dropdown" class="dropdown-toggle" href="#">
                <img width="34" height="34" src="/static/images/avatar-male.jpg" />Shinveam<b class="caret"></b></a>
                <ul class="dropdown-menu">
                  <li><a href="/article/gallery">
                    <i class="icon-picture"></i>图片欣赏</a>
                  </li>
                    <li><a href="/article/chat" target="_blank">
                        <i class="icon-comments"></i>和我聊天</a>
                    </li>
                  <li><a href="/article/404">
                    <i class="icon-gear"></i>账号设置</a>
                  </li>
                  <li><a href="/article/exit">
                    <i class="icon-signout"></i>退出</a>
                  </li>
                </ul>
              </li>
            </ul>
          </div>
          <button class="navbar-toggle">
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
          </button>
            <a class="logo" href="/article/index"></a>
          <form class="navbar-form form-inline col-lg-2 hidden-xs">
            <input class="form-control" placeholder="Search" type="text">
          </form>
        </div>
      </div>
      <!-- End Navigation -->
      <div class="container-fluid main-content">
        <div class="page-title">
          <h1>
            我的文章
          </h1>
        </div>
        <!-- DataTables Example -->
        <div class="row">
          <div class="col-lg-12">
            <div class="widget-container fluid-height clearfix">
              <div class="heading">
                <i class="icon-table"></i> <a href="/article/publish">创建文章？</a>
              </div>
              <div class="widget-content padded clearfix" style="padding-top: 0px;">
                <table class="table table-bordered table-striped" id="dataTable1">
                  <thead>
                    <th class="check-header hidden-xs">
                      <label><input id="checkAll" name="checkAll" type="checkbox"><span></span></label>
                    </th>
                    <th>
                      文章标题
                    </th>
                    <th>
                        分类
                    </th>
                    <th>
                      创建时间
                    </th>
                    <th class="hidden-xs">
                      浏览量
                    </th>
                    <th></th>
                  </thead>
                  <tbody>

                  {{range .articles}}
                  <tr>
                      <td class="check hidden-xs">
                          <label><input name="optionsRadios1" type="checkbox" value="option1"><span></span></label>
                      </td>
                      <td>
                          <a href="/article/content?cid={{.Id}}" target="_blank">{{.ArtiName}}</a>
                      </td>
                      <td>
                      {{.ArticleType.TypeName}}
                      </td>
                      <td>
                      {{.PubTime}}
                      </td>
                      <td class="hidden-xs">
                      {{.Count}}
                      </td>
                      <td class="actions">
                          <div class="action-buttons">
                              <a class="table-actions" href="#"><i class="icon-eye-open"></i></a>
                              <a class="table-actions" href="/article/revise?rid={{.Id}}" onclick="revise(this)"><i class="icon-pencil"></i></a>
                              <input type="hidden" value="{{.Id}}">
                              <a class="table-actions" href="javascript:void(0);" onclick="del(this)"><i class="icon-trash"></i></a>
                          </div>
                      </td>
                  </tr>
                  {{end}}

                  </tbody>
                </table>

                  <div class="dataTables_info" id="datatable-editable_info">有{{.count}}条记录/共{{.pageCount}}页/当前为第{{.pageIndex}}页</div>

                  <div class="dataTables_paginate paging_full_numbers" id="dataTable1_paginate">
                  {{if compare .FirstPage true}}
                      <a tabindex="0" class="first paginate_button paginate_button_disabled" id="dataTable1_first">首页</a>
                      <a tabindex="0" class="previous paginate_button paginate_button_disabled" id="dataTable1_previous">上一页</a>
                  {{else}}
                      <a tabindex="0" class="first paginate_button" id="dataTable1_first" href="/article/index?page=1">首页</a>
                      <a tabindex="0" class="previous paginate_button" id="dataTable1_previous" href="/article/index?page={{.pageIndex | PreviousPage}}">上一页</a>
                  {{end}}
                      {{/*<span>*/}}
                          {{/*<a tabindex="0" class="paginate_active paginate_button_disabled">1</a>*/}}
                          {{/*<a tabindex="0" class="paginate_button paginate_button_disabled">2</a>*/}}
                      {{/*</span>*/}}
                  {{if compare .LastPage true}}
                      <a tabindex="0" class="next paginate_button paginate_button_disabled" id="dataTable1_next">下一页</a>
                      <a tabindex="0" class="last paginate_button paginate_button_disabled" id="dataTable1_last">末页</a>
                  {{else}}
                      <a tabindex="0" class="next paginate_button" id="dataTable1_next" href="/article/index?page={{.pageIndex | NextPage}}">下一页</a>
                      <a tabindex="0" class="last paginate_button" id="dataTable1_last" href="/article/index?page={{.pageCount}}">末页</a>
                  {{end}}
                  </div>

              </div>
            </div>
          </div>
        </div>
        <!-- end DataTables Example -->
      </div>
    </div>
  </body>

<script type="text/javascript">
    window.onload = function () {
        {{.Id}}
    };

    function del(a) {
        var value=a.previousElementSibling.value;
        if (!confirm("确认删除？")) {
            return false;
        }
        $.post("/article/delete?id="+value,{},function(resultData,statu){
            window.location.reload();
        })

    }

</script>

</html>